MPRI course 2-4 “Functional programming languages” Answers to the exercises
نویسنده
چکیده
class Closure { abstract Object apply(Object arg); Object apply2(Object arg1, Object arg2) { return ((Closure)(apply(arg1))).apply(arg2); } } abstract class Closure2 extends Closure { Object apply(Object arg) { return new PartialApplication(this, arg); } abstract Object apply2(Object arg1, Object arg2); } class PartialApplication extends Closure { Closure2 fn; Object arg1;
منابع مشابه
MPRI course 2-4-2 “Functional programming languages” Answers to the exercises
class Closure { abstract Object apply(Object arg); Object apply2(Object arg1, Object arg2) { return ((Closure)(apply(arg1))).apply(arg2); } } abstract class Closure2 extends Closure { Object apply(Object arg) { return new PartialApplication(this, arg); } abstract Object apply2(Object arg1, Object arg2); } class PartialApplication extends Closure { Closure2 fn; Object arg1; PartialApplication(Cl...
متن کاملFunctional Programming in a Basic Database Course1
This paper describes why and how a functional programming language was used in an introductory database course. The purpose of the programming exercises in this course is to give students a better understanding of the internal structure and use of databases and database management systems. We used a functional language for its high level of abstraction and the automatic memory management which ...
متن کاملTemporal logics
These notes have been written as a support for the course about temporal logics taught at MPRI (Master Parisien de Recherche en Informatique) during the first semester of year 2006-2007. They contain most of what will be studied during the course, most often with detailled proofs, and several exercises, ranked from easy ( ) to hard ( ).
متن کاملFunctional Programming - Crossing The Chasm?
Once again the computing community is coming to appreciate the expressive power of functional programming (FP) [1, 2]. Technical gatherings are buzzing with talk and, of course, debates about Haskell, Lisp/Scheme, Erlang and their younger hybrid cousins O’Caml, Scala, F# and Clojure. At the same time, popular OO languages Java and C# are being extended to support functional constructs with even...
متن کاملDeclarative Debugging of Missing Answers in Constraint Functional-Logic Programming
It is well known that constraint logic and functional-logic programming languages have many advantages, and there is a growing trend to develop and incorporate effective tools to this class of declarative languages. In particular, debugging tools are a practical need for diagnosing the causes of erroneous computations. Recently [1], we have presented a prototype tool for the declarative diagnos...
متن کامل